<?php

namespace app\admin\model\scanwork;

use think\Model;

class Stock extends Model
{
    protected $name = 'scanwork_stock';
    protected $autoWriteTimestamp = 'int';
    protected $createTime = 'createtime';
    protected $updateTime = 'updatetime';

    public function material()
    {
        return $this->belongsTo('Material', 'material_id', 'id', [], 'LEFT')->setEagerlyType(0);
    }

    public function warehouse()
    {
        return $this->belongsTo('Warehouse', 'warehouse_id', 'id', [], 'LEFT')->setEagerlyType(0);
    }

    public function location()
    {
        return $this->belongsTo('Location', 'location_id', 'id', [], 'LEFT')->setEagerlyType(0);
    }
}

